<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center tutoringReview_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub tutoringReview_fd0_0'>
          <view class='flex flex-wrap align-center tutoringReview_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='tutoringReview_fd0_0_c1_c0'>{{$t('审核状态')}}</text>
          </view>
          <view class='flex flex-wrap align-center justify-end tutoringReview_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout tutoringReview_flex_1">
        <view class='flex flex-wrap align-center justify-center'>
          <image class='tutoringReview_fd1_0_c0' mode="aspectFit" :src='STATIC_URL+"74.png"'
            v-if=" auditing.check_status=='1'"></image>
          <image class='tutoringReview_fd1_0_c0' mode="aspectFit" :src='STATIC_URL+"83.png"'
            v-if=" auditing.check_status=='3'"></image>
        </view>
        <view class='flex flex-wrap align-center justify-center tutoringReview_fd1_1'>
          <text class='tutoringReview_fd1_1_c0' v-if=" auditing.check_status=='1'">{{$t('您的师父预约申请已提交成功')}}</text><text
            class='tutoringReview_fd1_1_c0' v-if=" auditing.check_status=='3'">{{$t('您的师父预约审核已驳回')}}</text>
        </view>
        <view class='flex flex-wrap align-center justify-center tutoringReview_fd1_2'
          v-if=" auditing.check_status=='1' ">
          <text class='tutoringReview_fd1_2_c0'>{{$t('您的申请已提交，3-7个工作日为您反馈预约结果')}}</text>
        </view>
        <view class='flex flex-wrap align-center justify-center tutoringReview_fd1_2'
          v-if=" auditing.check_status=='3'">
          <view class='tutoringReview_fd1_3_c0'>
            <text class='tutoringReview_fd1_3_c0_c0'>{{$t('驳回原因：')}}</text>
            <text class='tutoringReview_fd1_3_c0_c0'>{{auditing.reason}}</text>
          </view>
        </view>
        <view class='flex flex-wrap align-center justify-center tutoringReview_fd1_4'>
          <button class='tutoringReview_fd1_4_c0' @tap.stop="handleJumpDiy" data-type="switchTab"
            :data-url="`/pages/tabBar/homePage/homePage`"
            v-if=" auditing.check_status=='1' ">{{$t('返回')}}</button><button class='tutoringReview_fd1_4_c0'
            @tap.stop="handleJumpDiy" data-type="navigateTo"
            :data-url="`/pages/shouye/psychologicalCounseling/psychologicalCounseling`"
            v-if=" auditing.check_status=='3'">{{$t('再次申请')}}</button>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "auditing": {
          "true_name": "",
          "mobile": "",
          "user_nickname": "",
          "time": "",
          "remark": "",
          "check_status": "",
          "create_time": "",
          "user_id": "",
          "reason": ""
        },
        "id": "",
        "state": "1"
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        id,
        state
      } = options
      if (id !== undefined) this.id = id
      if (state !== undefined) this.state = state
      if (this.state == 'yuyue') {
        this.auditing.check_status = 1
      } else {
        this.getAuditingFunc()
      }

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取审核状态
      async getAuditingFunc() {
        //请求方法
        //数据验证

        let dataauditing = await this.$api.post(global.apiUrls.post656190dec1426, {
          aid: this.id
        });

        if (dataauditing.data.code != 1) {
          this.$message.info(dataauditing.data.msg);
          return
        }
        let infoauditing = dataauditing.data;
        this.auditing = infoauditing.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(247, 243, 237, 1);
    background-size: 100% auto;
  }

  .tutoringReview_flex_0 {
    background: rgba(247, 243, 237, 1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .tutoringReview_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .tutoringReview_fd0_0_c0 {
    width: 120rpx;
  }

  .tutoringReview_fd0_0 {
    border-bottom: 1px solid #eee;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .tutoringReview_flex_1 {
    padding: 184rpx 0rpx 0rpx 0rpx;
  }

  .tutoringReview_fd1_4_c0 {
    background: rgba(145, 47, 34, 1);
    border-radius: 44rpx;
    width: 466rpx;
    line-height: 88rpx;
    font-size: 32rpx;
    color: #fff;
  }

  .tutoringReview_fd1_4 {
    margin: 386rpx 0rpx 0rpx 0rpx;
  }

  .tutoringReview_fd1_3_c0_c0 {
    color: #666666;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 42rpx;
  }

  .tutoringReview_fd1_3_c0 {
    // width: 500rpx;
  }

  .tutoringReview_fd1_2_c0 {
    color: #666666;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .tutoringReview_fd1_2 {
    margin: 40rpx 0rpx 0rpx 0rpx;
  }

  .tutoringReview_fd1_1_c0 {
    color: #333333;
    font-size: 36rpx;
    font-weight: 500;
    line-height: 42rpx;
  }

  .tutoringReview_fd1_1 {
    margin: 32rpx 0rpx 0rpx 0rpx;
  }

  .tutoringReview_fd1_0_c0 {
    width: 200rpx;
    height: 200rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }
</style>